package com.dj.shop.vo;






import com.dj.shop.valid.Insert;
import com.dj.shop.valid.Update;

import javax.validation.constraints.NotNull;

/**
 * @Auther: zhaoyu
 * @Date: 2018/9/14 15:50
 * @Description:
 *
 * @Emmail: zhaoyu@atgco.cn
 */
public class User {

    @NotNull(message = "userName 不可為空",groups = {Insert.class})
    private String userName;

    @NotNull(message = "age 不可为空",groups = {Insert.class})
    private Integer age;

    @Override
    public String toString() {
        return "User{" +
                "userName='" + userName + '\'' +
                ", age=" + age +
                ", sex='" + sex + '\'' +
                '}';
    }

    @NotNull(message = "sex 不可为空",groups = {Update.class})
    private String sex;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }
}
